#
#
CDEPEND         = makedepend $(CFLAGS)
CFLAGS          = -O2 $(INCLUDEDIRS)
COBJS           = $(CSRCS:%.c=%.o)
CSRCS           =  	sip_str.c \
			sip_debug.c \
			elk_port.c \
			elk_list.c \
			elk_sip_address.c \
			elk_sip.c \
			sip_msg.c \
			rfc2617.c \
			sipparse.c \
			via_parse.c \
			www_auth.c  \
			elk_nonce.c \
			contact.c \
			elk_udp.c \
			random.c \
			md5.c \
			elk_timer.c \
			elk_fsm.c


INCLUDEDIRS     = -I./inc -I./
CC = gcc -g 
AR = ar
LDFLAGS         = $(LIBS)
#LIBDIRS         = -L../lib 
#LIBS            = $(LIBDIRS) -lpthread
PROJ            = libelksip.a
#noinst_LIBRARIES 
 
all: $(PROJ)

test: $(UNI_TEST) 

cdepend: $(CSRCS)
	$(CDEPEND) $(CSRCS)
 
clean:
	rm -f $(COBJS)
	rm -f $(PROJ)
 

$(PROJ): $(COBJS)
	$(AR) cru $@ $(COBJS) $(LDFLAGS)
test: 	
	 gcc unit_test.c libelksip.a $(INCLUDEDIRS) -o unit_test
	 gcc anomaly_test.c libelksip.a $(INCLUDEDIRS) -o anomaly_test

